package com.stock.api;

import com.stock.dto.LoginDTO;
import com.stock.response.ResponseResult;
import com.stock.vo.CaptchaVO;
import com.stock.vo.LoginVO;
import org.springframework.web.bind.annotation.*;

/**
 * @author zby
 * @created 2024-06-22 22:44
 * @description 对外暴露用户接口
 */
@RequestMapping(path = "/api")
public interface UserControllerAPI {

    /**
     * 环境测试接口
     *
     * @return String
     */
    @GetMapping(path = "/user/test")
    String getName(@RequestParam("name") String name);


    @GetMapping(path = "/captcha")
    ResponseResult<CaptchaVO> generateCaptcha();

    /**
     *  登录接口
     * @param dto 登录参数
     * @return ResponseResult
     */
    @PostMapping(path = "/login")
    ResponseResult<LoginVO> login(@RequestBody LoginDTO dto);
}
